Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: using __cpp_nontype_template_args instead of __cpp_nontype_template_parameter_class #5330

Merged
merged 3 commits into from
Aug 26, 2024

Conversation

ObeliskGate
Copy link
Contributor

@ObeliskGate ObeliskGate commented Aug 23, 2024

Description

Since macro __cpp_nontype_template_parameter_class is an GNU extension which has never been mentioned at cppreference, This PR use the standard __cpp_nontype_template_args instead to enable all compilers (currently MSVC) to use py::typing::StringLiteral. By the way, this macro does't satisfy the feature-testing value at gcc-10 so it can provide a more standardized fix to #5201.

Suggested changelog entry:

fix: using ``__cpp_nontype_template_args`` instead of ``__cpp_nontype_template_parameter_class``

@ObeliskGate ObeliskGate marked this pull request as ready for review August 23, 2024 06:04
Copy link
Collaborator

@rwgk rwgk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! (The situation with the two macros is really confusing!)

@rwgk
Copy link
Collaborator

rwgk commented Aug 23, 2024

@henryiii for awareness.

@henryiii henryiii merged commit 3fb16ad into pybind:master Aug 26, 2024
78 checks passed
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Aug 26, 2024
henryiii pushed a commit that referenced this pull request Sep 13, 2024
…mplate_parameter_class` (#5330)

* fix: use `__cpp_nontype_template_args` instead of gnu extensions

* fix: add feature test value

* fix: change `PYBIND11_TYPING_H_HAS_STRING_LITERAL` skip reason
henryiii pushed a commit that referenced this pull request Sep 13, 2024
…mplate_parameter_class` (#5330)

* fix: use `__cpp_nontype_template_args` instead of gnu extensions

* fix: add feature test value

* fix: change `PYBIND11_TYPING_H_HAS_STRING_LITERAL` skip reason
@ObeliskGate ObeliskGate deleted the string_literal_fix branch October 10, 2024 01:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs backport needs changelog Possibly needs a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants